import axios from 'axios'

axios.defaults.baseURL = `/api`

axios.interceptors.request.use(config => {
  // 添加请求头
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

export default axios
